#include <QCoreApplication>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    {
      int A,B,C=0;
      cout<<"Vvedite chislo A: ";
      cin>>A;
      cout<<"Vvedite chislo B: ";
      cin>>B;
      C=0;
        if (A<B)
        {
          for (;A<=B;A++)
          {
            C=C+A;
          }
          cout<<endl<<C;
}
    }
    return a.exec();}
